package main


import (
"fmt"
"container/ring"
)


func main(){

   r1 :=   ring.New(2)

   for i:= 0 ;i< r1.Len();i++{
       r1.Value = i
       r1 = r1.Next()

   }

   r1.Unlink(1)


   r1.Do(func(p interface{}) {
            fmt.Println(p.(int))
    })
   
   fmt.Println("ok")

}
